<?xml version='1.0' encoding='UTF-8' ?>
<!--

    Copyright (c) 2014, 2019 Oracle and/or its affiliates. All rights reserved.

    This program and the accompanying materials are made available under the
    terms of the Eclipse Distribution License v. 1.0, which is available at
    http://www.eclipse.org/org/documents/edl-v10.php.

    SPDX-License-Identifier: BSD-3-Clause

-->

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:composite="http://java.sun.com/jsf/composite"
      xmlns:f="http://xmlns.jcp.org/jsf/core">
    <h:head>
        <title>#{bundle['students.current.checked.in.page.title']}</title>
    </h:head>
    <h:body>
        <composite:interface />
        <composite:implementation>
            <h2>#{bundle['students.current.checked.in.table.title']}</h2>
            <h:form>
                <h:dataTable value="#{requestBean.checkedInStudents}" 
                             var="student"
                             summary="#{bundle['students.current.checked.in.table.title']}"
                             rowClasses="table-row-odd,table-row-even">
                    <h:column>
                        <f:facet name="header">
                            <h:outputText value="#{bundle['student.name']}" />
                        </f:facet>
                        <h:outputText value="#{student.name}" />
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            <h:outputText value="#{bundle['table.header.actions']}" />
                        </f:facet>
                        <h:commandButton action="#{requestBean.checkOut(student)}"
                                         value="#{bundle['action.checkout']}" />
                        <h:commandButton action="#{requestBean.atPark(student)}"
                                         value="#{bundle['action.park.at']}" />
                    </h:column>
                </h:dataTable>
            </h:form>
        </composite:implementation>
    </h:body>
</html>

